package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javabean.JPanelImagen;
import javax.swing.JButton;
import javax.swing.JLabel;

import javax.swing.ButtonGroup;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JRadioButton;

import javax.swing.WindowConstants;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VentanaMenu extends javax.swing.JFrame {

	{
		//Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
		} catch(Exception e) {
			e.printStackTrace();
		}
	}

	private JMenuBar menuPrincipal;
	private JMenu menuSistema;
	private JMenuItem menuConsultar;
	private JMenuItem menuSalirAhora;
	private JMenu menuSalir;
	private JMenuItem menuNivel3;
	private JMenuItem menuNivel2;
	private JLabel lblElegirNivel;
	private JButton btnJugar;
	private JLabel lblPresentacion2;
	private JLabel lblPresentacion;
	private JMenuItem menuNivel1;
	private JMenuItem menuListados;
	private JMenuItem menuFrase;
	private JMenuItem menuRegistrar;
	private JPanelImagen panFondo;

	/**
	* Auto-generated main method to display this JFrame
	*/
		
	public VentanaMenu() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				menuPrincipal = new JMenuBar();
				setJMenuBar(menuPrincipal);
				{
					menuSistema = new JMenu();
					menuPrincipal.add(menuSistema);
					menuSistema.setText("Sistema");
					{
						menuRegistrar = new JMenu();
						menuSistema.add(menuRegistrar);
						menuRegistrar.setText("Registrar");
						{
							menuFrase = new JMenuItem();
							menuRegistrar.add(menuFrase);
							menuFrase.setText("Nueva Frase");
						}
					}
					{
						menuConsultar = new JMenu();
						menuSistema.add(menuConsultar);
						menuConsultar.setText("Consultar");
						{
							menuListados = new JMenuItem();
							menuConsultar.add(menuListados);
							menuListados.setText("Listado");
							/*{
								menuNivel1 = new JMenuItem();
								menuListados.add(menuNivel1);
								menuNivel1.setText("Nivel 1");
							}
							{
								menuNivel2 = new JMenuItem();
								menuListados.add(menuNivel2);
								menuNivel2.setText("Nivel 2");
							}
							{
								menuNivel3 = new JMenuItem();
								menuListados.add(menuNivel3);
								menuNivel3.setText("Nivel 3");
							}*/
						}
					}
				}
				{
					menuSalir = new JMenu();
					menuPrincipal.add(menuSalir);
					menuSalir.setText("Salir");
					{
						menuSalirAhora = new JMenuItem();
						menuSalir.add(menuSalirAhora);
						menuSalirAhora.setText("Salir");
					}
				}
				{
					panFondo = new JPanelImagen();
					getContentPane().add(panFondo, BorderLayout.CENTER);
					panFondo.setRutaImagen("/iconos/homersf4.jpg");
					panFondo.setPreferredSize(new java.awt.Dimension(600, 387));
					ButtonGroup btgNivel = new ButtonGroup();
					{
						lblPresentacion = new JLabel();
						panFondo.add(lblPresentacion);
						lblPresentacion.setText("JUEGA EL AHORCADO");
						lblPresentacion.setBounds(38, 10, 289, 23);
						lblPresentacion.setFont(new java.awt.Font("Tempus Sans ITC",1,22));
						lblPresentacion.setForeground(new java.awt.Color(255,255,255));
					}
					{
						lblPresentacion2 = new JLabel();
						panFondo.add(lblPresentacion2);
						lblPresentacion2.setText("Y DIVIERTE COMO NUNCA");
						lblPresentacion2.setBounds(17, 45, 348, 26);
						lblPresentacion2.setFont(new java.awt.Font("Tempus Sans ITC",1,22));
						lblPresentacion2.setForeground(new java.awt.Color(255,255,255));
					}
					{
						btnJugar = new JButton();
						panFondo.add(btnJugar);
						btnJugar.setText("JUGAR");
						btnJugar.setBounds(427, 193, 106, 29);
						btnJugar.setFont(new java.awt.Font("Tempus Sans ITC",1,11));
					}
					{
						lblElegirNivel = new JLabel();
						panFondo.add(lblElegirNivel);
						lblElegirNivel.setText("PRESIONA EL BOTON");
						lblElegirNivel.setBounds(417, 139, 151, 22);
						lblElegirNivel.setFont(new java.awt.Font("Tempus Sans ITC",1,11));
						lblElegirNivel.setForeground(new java.awt.Color(255,255,255));
					}

				}
			}
			pack();
			this.setSize(645, 450);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	public void addListener(ActionListener actionListener) {
		menuSalirAhora.addActionListener(actionListener);
		menuFrase.addActionListener(actionListener);
		btnJugar.addActionListener(actionListener);
		menuListados.addActionListener(actionListener);
	}

}
